<?php
	$a = array( '1'=>'vvv', '2'=>'cc', '12'=>'ss', '100'=>'xx');
	$i = '1';
	$j = '3';
	
	if( empty( $a[$i] ) ) {
		echo 'a[1] is not existed<br>';
	} else {
		echo $a[$i]."<br>";
	}
	if( empty( $a[$j] ) ) {
		echo 'a[3] is not existed<br>';
	} else {
		echo $a[$j]."<br>";
	}

	$year = '2011';
	$month = '05';
	$s = $year.'-'.$month.'-02';
	echo 's='.$s;
	echo '<br>';
	
	$date = date_create($s);
	echo date_format($date, 'Y-m-d');
	echo '<br>';
	
	$d = date_create('2010-05-01');
	echo date_format($d, 'Y-m-d');
?>